<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

//Route::middleware('auth:api')->get('/user', function (Request $request) {
//    return $request->user();
//});




//微信登陆api
Route::post("wxlogin", "MinApp\MinAppController@wxlogin");




//获取文章，轮播图，类型，文章详情等api
Route::post("getarticle", "MinApp\MinAppController@getarticle"); //获取文章
Route::post("getslider", "MinApp\MinAppController@getslider");   //获取轮播图
Route::post("gettypes", "MinApp\MinAppController@gettypes");     //获取文章类型
Route::post("ar_detail", "MinApp\MinAppController@ar_detail");   //获取文章详情




//观看记录，喜欢记录，点赞记录的安排
Route::post("setseen", "MinApp\MinAppController@setseen");   //获取文章详情
Route::post("setlike", "MinApp\MinAppController@setlike");   //获取文章详情
Route::post("setzan", "MinApp\MinAppController@setzan");   //获取文章详情


//观看记录，喜欢记录，点赞记录的查看
Route::post("getseen", "MinApp\MinAppController@getseen");   //获取文章详情
Route::post("getlike", "MinApp\MinAppController@getlike");   //获取文章详情
Route::post("getzan", "MinApp\MinAppController@getzan");   //获取文章详情



//获取观看次数和用户余额
Route::post("seencount", "MinApp\MinAppController@seencount");   //获取观看次数
Route::post("getamount", "MinApp\MinAppController@getamount");   //获取用户余额


//开通会员有关的api
Route::post("createunifyorder", "admin\PayController@createunifyorder");   //启动开通会员接口并实现支付
Route::post("vipnotify", "admin\VipController@vipnotify");       //获取订单详情
Route::post("payviporder", "admin\VipController@payviporder");       //获取订单详情


//评论功能
Route::post("insertcomment", "admin\CommentController@insertcomment");
Route::post("getcomment", "admin\CommentController@getcomment");



//按照类型获取文章
Route::post("orderby", "MinApp\MinAppController@orderby");



//充值
Route::post("amountorder", "admin\AmountController@amountorder");
Route::post("amountnotify", "admin\AmountController@amountnotify");


//查看支付历史
Route::post("amounthistory", "MinApp\MinAppController@amounthistory");
Route::post("viphistory", "MinApp\MinAppController@viphistory");



//添加管理员信息
Route::post("manager", "admin\ManagerController@manager");


//小程序实现搜索功能
Route::post("sreacharticle", "MinApp\MinAppController@sreacharticle");


//小程序实现搜索功能
Route::post("moveamount", "MinApp\MinAppController@moveamount");
